<extend name="Layout:layout_dialog" />
<block name="body_main">
    <div class="grid-parent xsui-page-header">
        <a id="lnk-do" href="{:U('promotion_picker_save','aid=varkey&id='.$id)}" class="xsui-btn ui-state-default"><i class="fa fa-save"></i>保存</a>&nbsp;
        <a href="#" class="xsui-btn ui-state-default xsui-btn-refresh"><i class="fa fa-refresh"></i>刷新</a>
    </div>
    <div id="grid-container">
        <table class="xsui-table xsui-table-striped xsui-table-hover xsui-table-bordered">
            <thead>
                <tr>
                    <th>标题</th>
                    <th>时间</th>
                </tr>
            </thead>
            <tbody>
            <foreach name="list" item="vo">
                <tr data-key="{$vo.id}">
                    <td>{$vo.title}</td>
                    <td>{$vo.create_time}</td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="xsui-pagination">{$page}</div>
    </div>
</block>
<block name="body_after">
    <script type="text/javascript">
        $('#lnk-do').click(function () {
            var ids = $('.xsui-table').table('getCheckedValues');
            if (!ids) {
                alert('没有选中任何活动!');
                return false;
            }
            var $this = $(this);
            $this.attr('href', $this.attr('href').replace('varkey', ids));
        })
    </script>
</block>